<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>登录界面</title>
		<link rel="stylesheet" href="/static/css/reset.css" />
		<link rel="stylesheet" href="/static/css/common.css" />
		<link rel="stylesheet" href="/static/css/font-awesome.min.css" />
		<link rel="stylesheet" type="text/css" href="/static/css/style.css">
		<link rel="stylesheet" href="/static/css/layui.css" media="all">
		<style>
			.myfooter {
				margin-top: 0px;
			}

			.myli {
				font-size: 45px;
				color: #FF5722;
				margin-top: 20px;
				margin-right: 10px;
			}
		</style>
	</head>

	<body>

		<!--head------->
		<header>
			<div class="top center">
				<div class="right fr">
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
			</div>
		</header>
		<!--head------->

		<!-- top2 search-->
		<div class="banner_x center">
			<a href="/user/index" taget="_blank">
				<i class="layui-icon layui-icon-home fl myli"></i>
			</a>
			<div class="nav fl">
				<ul style="margin-left:50px;">
					<li>
						<a href="/liebiao.html" target="_blank">手机</a>
					</li>
					<li>
						<a href="">电脑 平板</a>
					</li>
					<li>
						<a href="">平板·笔记本</a>
					</li>
					<li>
						<a href="">电视</a>
					</li>
					<li>
						<a href="">盒子·影音</a>
					</li>
					<li>
						<a href="">路由器</a>
					</li>
					<li>
						<a href="">智能硬件</a>
					</li>
					<li>
						<a href="">服务</a>
					</li>
					<li>
						<a href="">社区</a>
					</li>
				</ul>
			</div>
			<!--search 框-->
			<div class="search fr">
				<form action="#" method="post">
					<div class="text fl">
						<input type="text" class="shuru" placeholder="请输入需要的商品">
					</div>
					<div class="submit fl">
						<input type="submit" class="sousuo" value="搜索" />
					</div>
					<div class="clear"></div>
				</form>
				<div class="clear"></div>
			</div>
		</div>
		<!-- top2 -->

		<div class="wrap modify_wrap">
			<div class="content" style="margin-top:150px;">
				<div class="login_box">

					<div class="login_form">
						<div class="login_title">
							用户修改密码
						</div>
						<form action="/user/modifyPwd/" method="post">
							<div style="height: 20px;text-align: center">
                                {% if msg %}
                                    <p style="color: red">{{ msg }}</p>
                                {% endif %}
							</div>

                            <div class="form_text_ipt">
								<input name="username" type="text" placeholder="请输入用户名"/>
							</div>
							<div class="ececk_warning"><span>用户名不能为空</span></div>
							<div class="form_text_ipt">
								<input id='tel'  name="tel" type="text" placeholder="请输入电话号码"/>
							</div>
							<div class="ececk_warning"><span>手机号/邮箱不能为空</span></div>
							<div class="form_text_ipt">
								<input name="password1" type="password" placeholder="请输入新密码">
							</div>
							<div class="ececk_warning"><span>密码不能为空</span></div>
							<div class="form_text_ipt">
								<input name="password2" type="password" placeholder="确认新密码">
							</div>
							<div class="ececk_warning"><span>密码不能为空</span></div>
							<div class="form_text_ipt">
								<input name="code" type="text" placeholder="请输入短信验证码">
							</div>
							<div class="ececk_warning"><span>验证码不能为空</span></div>
							<div class="form_check_ipt">
								<div class="right check_right">
									<a onclick="sendMsgCode()" >点击发送验证码</a>
								</div>
							</div>
							<div class="form_btn">
								<input class="layui-btn layui-btn-danger" type="submit" value="保存修改" style="width: 300px;" />
							</div>
							<div class="form_reg_btn">
								<a href="/user/login">登录</a>
							</div>
						</form>
						<div class="other_login">
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--footer---------->
		<footer class="mt20 center layui-bg-black myfooter">
            <h2>易淘二手商城版权所有I</h2>
		</footer>
		<!--footer---------->
		<script type="text/javascript" src="/static/js/jquery-3.3.1.js"></script>
		<script type="text/javascript" src="/static/js/common.js"></script>
		<script>
            //发送邮箱验证码
			function sendMsgCode(){
                var tel = document.getElementById("tel").value;
                var data = {"tel": tel};
                $.ajax({
                    type: 'post',
                    url: '/user/getMsgCode/',
                    // 是需要传输的数据
                    data: data,
                    // 发送类型， 默认是form表单格式
                    dataType: "json",
                    success: function (res) {
                        alert(res.msg)
                    },
                    error: function () {

                    }
                })
            }
		</script>
	</body>
</html>